package com.yonyou.pmclouds.safetyrectification.service;

import com.yonyou.pmclouds.basecom.entity.PageObject;
import com.yonyou.pmclouds.basecom.exception.BusinessException;
import com.yonyou.pmclouds.safetyrectification.entity.SafetyRectificationVO;

import java.util.List;

/**
 * 安全整改查询接口
 *
 * @author th
 * @date 2019/10/24 13:37
 */
public interface ISafetyRectificationQuery {

    /**
     * 跟据主键查询
     *
     * @param id
     * @return
     * @throws BusinessException
     */
    SafetyRectificationVO getById(String id) throws BusinessException;

    /**
     * 根据项目和单据状态查询
     *
     * @param pkProject
     * @param billStatus
     * @return
     */
    List<SafetyRectificationVO> getByProject(String pkProject, Integer billStatus) throws BusinessException;

    /**
     * 单据查看获取安全整改查询结果
     *
     * @param pkProjects
     * @param creators
     * @param startDate
     * @param endDate
     * @param billStatus
     * @param pageStart
     * @param pageSize
     * @return
     * @throws BusinessException
     */
    PageObject<Object> queryByCondition(String[] pkProjects, String[] creators, String startDate, String endDate,
                                        int[] billStatus, int pageStart, int pageSize) throws BusinessException;

    /**
     * 引用校验
     * @param code
     * @param ids
     * @return
     * @throws BusinessException
     */
    boolean queryRefByIds(String code, String[] ids) throws BusinessException;
}
